/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       skill.h

	$Header: /game/skill.h $

	$NoKeywords: $

 ************************************************************************/

#ifndef SKILL_H_INCLUDED
#define SKILL_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <vector>

int const k_primary_skill_limit = 5; // heroes can learn no more than 5 primary skills

enum t_skill_type
{
	k_skill_none = -1,

	k_skill_tactics,
	k_skill_combat_defense,
	k_skill_scouting,
	k_skill_nobility,

	k_skill_life_magic,
	k_skill_order_magic,
	k_skill_death_magic,
	k_skill_chaos_magic,
	k_skill_nature_magic,

	k_skill_offense,
	k_skill_defense,
	k_skill_leadership,

	k_skill_melee,
	k_skill_archery,
	k_skill_magic_resistance,

	k_skill_pathfinding,
	k_skill_seamanship,
	k_skill_stealth,

	k_skill_estates,
	k_skill_mining,
	k_skill_diplomacy,

	k_skill_healing_magic,
	k_skill_spirit_magic,
	k_skill_resurrection,

	k_skill_enchantment,
	k_skill_mind_magic,
	k_skill_charm,

	k_skill_black_magic,
	k_skill_demonology,
	k_skill_necromancy,

	k_skill_conjuration,
	k_skill_destructive_magic,
	k_skill_intelligence,

	k_skill_druid_magic,
	k_skill_meditation,
	k_skill_recruitment,

	k_skill_count,
	k_skill_type_count = k_skill_count,

	k_skill_primary_count = k_skill_nature_magic + 1,
};

enum t_skill_mastery
{
	k_mastery_none = -1,
	k_mastery_basic,
	k_mastery_advanced,
	k_mastery_expert,
	k_mastery_master,
	k_mastery_grand_master,

	k_mastery_count,
	k_skill_mastery_count = k_mastery_count,
};

struct t_skill
{
	t_skill_type    skill;
	t_skill_mastery level;

	t_skill()
	{
		skill = k_skill_none;
		level = k_mastery_none;
	}

	t_skill( t_skill_type type, t_skill_mastery mastery )
	{
		skill = type;
		level = mastery;
	}

	bool operator==( t_skill const& arg ) const;
	bool operator!= (t_skill const& arg ) const;
};

inline bool t_skill::operator == ( t_skill const& arg ) const
{
	return skill == arg.skill && level == arg.level;
}

inline bool t_skill::operator != (t_skill const& arg ) const
{
	return skill != arg.skill || level != arg.level;
}

typedef std::vector<t_skill_type> t_skill_list;

#endif // SKILL_H_INCLUDED
